package com.doudou.activity.dao;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.doudou.activity.model.OffLineActivity;
import com.doudou.platform.utils.TableNameUtils;

public interface OffLineActivityMapper {
	
   @Select(" select * from " + TableNameUtils.off_line_activity +" order by updateTime desc ")
   List<OffLineActivity> selectAll();
   
   @Select(" select * from " + TableNameUtils.off_line_activity +" where id=#{id}")
   OffLineActivity getEntityById(@Param("id")Long id);
   
   @Insert("insert  into " + TableNameUtils.off_line_activity+"  (offlineTheme,location,content,createTime,updateTime) values (#{offlineTheme},"
		   + "#{location},#{content},#{createTime},#{updateTime})") 
   void save(OffLineActivity entity);
}
